<!DOCTYPE html>
<html ng-app='myapp'>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">  <title></title>
    <title>作业管理系统</title>
    <link rel="stylesheet" href="../studentCss/reset.css">
    <!-- <link rel="stylesheet" type="text/css" href="../dest/main.css"> -->
    <link rel="stylesheet" type="text/css" href="../studentCss/global.css">
    <link rel="stylesheet" type="text/css" href="../studentCss/login.css">
</head>

<body ng-controller = 'loginController'>
	<h1>作业管理系统</h1>
    <form ng-model='loginform' name='loginform' novalidate>
        <div class="username-group">
            <input type="number" id="username" name="username" ng-model='username' placeholder="请输入账号" required  maxlength="12">
            <div>
                <div class="error-tip" ng-show='loginform.username.$dirty && loginform.username.$error.required'>请输入账号</div>
                <div class="error-tip" ng-show='loginform.username.$dirty && loginform.username.$error.pattern'>账号格式不正确</div>
            </div>
        </div>
        <div class="pwd-group">
            <input type="password" name="password" id="password" ng-model='password' placeholder="请输入密码" required minlength="6">
            <div>
                <div class="error-tip" ng-show='loginform.password.$dirty && loginform.password.$error.required'>请输入密码！</div>
                <div class="error-tip" ng-show='loginform.password.$dirty && loginform.password.$error.minlength'>请输入大于六位的密码</div>
            </div>
        </div>
        <button id="login" type="button" ng-class='{active:loginform.$valid}' ng-disabled="loginform.$invalid" ng-click = 'login()'>登录</button>
    </form>
    <script src='../../bower_components/angular/angular.min.js'></script>
    <script src='../studentJs/jquery-3.1.1.min.js'></script>
    <script src='../studentJs/flexible.debug.js'></script>
    <script src='../studentJs/login.js'></script>
</body>

</html>
